package com.cjy.checkin.controller;


import com.cjy.checkin.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/checkin")
    public Map<String ,Object> findAllCheckIn(){
        Map<String ,Object> result = new HashMap<>();
        result.put("code", userService.findAllCheckIn());
        result.put("contCheckIn",userService.countCheckIn());
        return result;
    }
    @GetMapping("/checkNo")
    public Map<String ,Object> findAllNoCheckIn(){
        Map<String ,Object> result = new HashMap<>();
        result.put("code", userService.findAllNoCheckIn());
        result.put("contNoCheck",userService.countNoCheckIn());
        return result;
    }


}

     

